package com.woniuxy.config;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ResponseResult<T> {
    private int code;
    private String msg;
    private T data;

    public ResponseResult(int code, String msg){
        this(code,msg,null);
    }
    public ResponseResult(T data){
        this(200,"ok",data);
    }
    public static final ResponseResult<Void> SUCCUESS=new ResponseResult<Void>(200,"ok");
    public static final ResponseResult<Void> FAIL=new ResponseResult<Void>(500,"ok");
}
